<%@ page language="java" import="com.cci.kangdao.utilTool.*,java.net.URLEncoder" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Insert title here</title>
</head>
<body>
	<%
	String phone = "15230850726";
	String smstext = "您此次的验证码为{验证码}，有效期1分钟，请输入后进行验证，谢谢！".replace("{验证码}", "5899");
	String result = null;
	//SmsTool.sendSms("15230850726", "您此次的验证码为{验证码}，有效期1分钟，请输入后进行验证，谢谢！".replace("{验证码}", "5899"));
	
	HttpRequestSms rq = new HttpRequestSms();
	rq.setCode("gbk");
	//ID：121693  用户名：admin，密码：Kms121693    签名：【康明斯中国】
	String sname = "admin";
	String spwd = "kms123";
	String epdi = "121693";
	String param;
	try {
		/**
		 * http://114.255.71.158:8061/
		 * username=XXXXXX&password= XXXXXX&message=ceshi&phone=13800138000&epid=XXXXXX&linkid=1234567890&subcode=
		 */
		param = "username=" + sname + "&password=" + PublicTool.compute(spwd) + "&phone=" + phone + "&message="
				+ URLEncoder.encode(smstext, "gbk")+"&epid="+epdi+"&linkid=&subcode=";
		result = rq.doRequest("http://39.105.175.123:9088/mxt/send", "post", param, null);
		
	} catch (Exception e) {
		e.printStackTrace();
	}
	%>
	<%=result %>
</body>
</html>